updating oE allow_break

allow_break

include std/console.e 
namespace console 
public procedure allow_break(types :boolean b) 

sets the behavior of Control+C and Control+Break keys.

Parameters:
  1. b : a boolean, TRUE ( = 1 ) to enable the trapping of Control+C and Control+Break; FALSE ( 0 ) to disable it.
Comments:

When b is 1 (TRUE), Control+C and Control+Break can terminate your program when it tries to read input from the keyboard. When b is 0 (FALSE) your program will not be terminated by Control+C or Control+Break.

Initially your program can be terminated at any point where it tries to read from the keyboard.

You can find out if the user has pressed Control+C or Control+Break by calling check_break.

Example 1:
include std/console.e 
allow_break(0)  -- don't let the user kill the program! 
See Also:

check_break

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu